-- phpMyAdmin SQL Dump
-- version 3.3.8
-- http://www.phpmyadmin.net
--
-- 主机: localhost:5029
-- 生成日期: 2010 年 11 月 16 日 09:35
-- 服务器版本: 5.1.40
-- PHP 版本: 5.2.14

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- 数据库: `stock_dw`
--

-- --------------------------------------------------------

--
-- 表的结构 `category`
--

CREATE TABLE IF NOT EXISTS `category` (
  `type` varchar(30) COLLATE latin1_bin DEFAULT NULL,
  `description` varchar(100) COLLATE latin1_bin NOT NULL
) ENGINE=BRIGHTHOUSE DEFAULT CHARSET=latin1 COLLATE=latin1_bin;

-- --------------------------------------------------------

--
-- 表的结构 `kline_daily`
--

CREATE TABLE IF NOT EXISTS `kline_daily` (
  `stock_code` varchar(10) COLLATE latin1_bin NOT NULL,
  `stock_date` datetime NOT NULL,
  `open` float NOT NULL,
  `high` float NOT NULL,
  `low` float NOT NULL,
  `close` float NOT NULL,
  `yield_rate` float NOT NULL,
  `vol` bigint(20) NOT NULL,
  `transaction_value` double NOT NULL,
  `ex_rights` smallint(6) NOT NULL DEFAULT '0'
) ENGINE=BRIGHTHOUSE DEFAULT CHARSET=latin1 COLLATE=latin1_bin;

-- --------------------------------------------------------

--
-- 表的结构 `stock_ex_right`
--

CREATE TABLE IF NOT EXISTS `stock_ex_right` (
  `stock_code` varchar(10) COLLATE latin1_bin NOT NULL,
  `register_date` date NOT NULL,
  `deduction_date` date DEFAULT NULL,
  `circulation_date` date DEFAULT NULL,
  `bonus_date` date DEFAULT NULL,
  `remark` text COLLATE latin1_bin
) ENGINE=BRIGHTHOUSE DEFAULT CHARSET=latin1 COLLATE=latin1_bin;

-- --------------------------------------------------------

--
-- 表的结构 `stock_info`
--

CREATE TABLE IF NOT EXISTS `stock_info` (
  `stock_code` varchar(10) COLLATE latin1_bin NOT NULL,
  `stock_name` varchar(30) COLLATE latin1_bin NOT NULL,
  `kind` varchar(1) COLLATE latin1_bin NOT NULL,
  `capital` double DEFAULT NULL,
  `capital_a` double DEFAULT NULL
) ENGINE=BRIGHTHOUSE DEFAULT CHARSET=latin1 COLLATE=latin1_bin;

-- --------------------------------------------------------

--
-- 表的结构 `stock_info_part_map`
--

CREATE TABLE IF NOT EXISTS `stock_info_part_map` (
  `g_stock_code` varchar(10) COLLATE latin1_bin NOT NULL,
  `r_stock_code` varchar(10) COLLATE latin1_bin NOT NULL
) ENGINE=BRIGHTHOUSE DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
